//
//  XrLayout.h
//  UI27-自定义Layout
//
//  Created by XuRui on 16/1/13.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import <UIKit/UIKit.h>


@class XrLayout;

//协议
@protocol  XrLayoutItemHeightDelegate <NSObject>

//参数1:layout
//参数2:位置信息
//参数3:item宽度
- (CGFloat)layout:(XrLayout *)layout heightForItemAtIndexPath:(NSIndexPath *)indexPath width:(CGFloat)width;

@end



@interface XrLayout : UICollectionViewLayout
@property (nonatomic, assign)NSInteger columCounts; /**< 列数 */

//对当前影响item(x,y,w,h)的布局属性
@property (nonatomic, assign)NSInteger columSpace; /**< 列间距 */
@property (nonatomic, assign)NSInteger rowSpace; /**< 行间距 */
@property (nonatomic, assign)UIEdgeInsets edgeInsets; /**< 边距 */

@property (nonatomic, assign)id<XrLayoutItemHeightDelegate>delegate;



@end
